#!/bin/sh
# paylog tail -f shell
# @since 2015/8/14
#
JQ_BIN=~/jq

if [ ! -x $JQ_BIN ];then
    #echo "not found $JQ_BIN,please install it,'wget http://stedolan.github.io/jq/download/linux64/jq'"
	#exit
    
    wget -P ~/ http://stedolan.github.io/jq/download/linux64/jq
    chmod +x ~/jq
fi

if [ $# -ne 1 ];then
	echo "Usage: ~/tail.sh [日志文件]"
	exit
fi

file=$1
tail -f $file| $JQ_BIN .
